home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Nave / Bomber Fortress.swf / scripts / DefineSprite_74 / frame_8 / DoAction.as
Encoding:
Text File  |  2006-06-13  |  641 b   |  30 lines

  1. my_radius = _width / "2";
  2. my_x = _X;
  3. my_y = _Y;
  4. my_n = _name;
  5. if(ymov == "")
  6. {
  7.    ymov = - "10";
  8.    xmov = eval("/:direction");
  9.    ysign = "0";
  10.    xsign = "0";
  11. }
  12. n = "1";
  13. while(eval("/:total_circles") >= n)
  14. {
  15.    if(n ne my_n)
  16.    {
  17.       n_x = getProperty("../" add n, _X);
  18.       n_y = getProperty("../" add n, _Y);
  19.       n_radius = getProperty("../" add n, _width) / "2";
  20.       delta_x = my_x + xmov - n_x;
  21.       delta_y = my_y + ymov - n_y;
  22.       if(delta_x * delta_x + delta_y * delta_y < (my_radius + n_radius) * (my_radius + n_radius))
  23.       {
  24.       }
  25.    }
  26.    n += "1";
  27. }
  28. _Y = my_y + ymov;
  29. _X = my_x + xmov;
  30.